<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box">

    </div>
  
    <script src="./js/react18.js"></script>
    <script src="./js/react-dom18.js"></script>
    <script src="./js/babel.min.js"></script>
    
    <script type="text/babel">

        // 创建一个根对象：
        let root = ReactDOM.createRoot(document.getElementById("box"));


        const msg= "hello";

        // 把jsx渲染到根对象对应的dom容器里
        root.render(<h2>标题2：{msg}</h2>);
        

    </script>
</body>

</html>